In applications involving multiple processing devices, such as computers and the like, a suitable communications network is used for exchanging data. Associated with any communications network is a set of access protocols which enable a communications path to be established between the devices. Various access protocols have been standardized over time to allow an application process in any processing device that supports a specific standard to communicate freely with an application process in any other processing device supporting the same standard.
Early attempts at implementing such standards in computers were often based on a single, complex and unstructured software program that was difficult to test and modify. To overcome this problem, the International Standards Organization (ISO) proposed a layered approach as a reference model. Under the ISO reference model, the communication subsystem is broken down into a number of layers, each which performs a well-defined function, with a well-defined interface between itself and the layer immediately above and immediately below.
The ISO reference model is made up of seven layers. The three lower layers are network dependent and are concerned with the protocols to link two or more processing devices over the network. The three lower layers include the physical layer, the link layer, and the network layer. The physical layer is concerned with the physical and electrical interface between the processing device and the network. The link layer builds on the physical connection between the processing device and network by providing to the network layer reliable information. The link layer typically provides error correction and similar functions. The network layer sits above the link layer, and is responsible for establishing a network connection.
A common data link protocol used by processing devices is Point-to-Point Protocol (PPP). PPP provides a standard encapsulation for multiplexing different network layer protocols simultaneously over the same link. The basic procedures, methodologies and protocol formats are defined in “The Point-to-Point Protocol (PPP)”, STD 51, RFC 1661, edited by Simpson, W., July 1994, the contents of which are incorporated herein by reference. This encapsulation uses high level data link control (HDLC) framing to delimit the encapsulated data. The HDLC framing is defined in “PPP in HDLC-like Framing”, STD 51, RFC 1662, edited by Simpson, W., July 1994, the contents of which is incorporated herein by reference.
Each HDLC frame begins and ends with a flag field represented by 0x7e, and is used for frame synchronization. To avoid falsely detecting a flag field in the HDLC frame payload, a byte stuffing escape mechanism is used. In particular, prior to transmission, the HDLC frame payload is examined for the flag sequence 0x7e. If the flag sequence is detected in the payload, it is replaced with a two byte sequence consisting of 0x7d followed by the flag sequence 0x7e exclusive-or'd with 0x20. In addition, if the byte 0x7d is detected in the payload, it too is replaced with a two byte sequence consisting of 0x7d followed by 0x7d exclusive-or'd with 0x20. While this approach is fairly effective, the computational overhead associated with framing the payload is increased.
The integrity of the HDLC frame can be monitored with a 16- or 32-bit cyclic redundancy check (CRC) on the payload. The CRC is calculated by performing a known algorithm on the binary bit stream forming the payload. At the receiving end, the CRC can be recalculated based on the received payload, and the calculated CRC can be compared to the transmitted CRC in the HDLC frame. If the calculated CRC does not match the transmitted CRC in the HDLC frame, a CRC error flag is set. This CRC approach, although improving error detection capability, also has the undesirable effect of increasing the computational overhead associated with framing the payload.
Given the tremendous increase in data rates needed to support today's technology, the overhead imposed by HDLC for PPP becomes progressively more burdensome. This is particularly true for hand-held wireless devices, such as cellular mobile phones and personal digital assistants, where the computational overhead of networking protocols is significant compared to application level processing. Accordingly, it would be advantageous to have an efficient and robust framing protocol that can be tailored to specific applications to reduced computational overhead and streamline the payload.